{# Ask the index a question and see the chunks it hands back, ranked, with the score and source of each: what an agent would retrieve. #} {% from "components/macros/layout.html" import card %} {% from "components/macros/form.html" import field, select, text_input, primary_button %} {% call card("Search", id="ai-rag-search") %} {% if collections %}
{% call field("Collection") %}{{ select("collection", collections, blank=None, block=True) }}{% endcall %}
{% call field("Question") %}{{ text_input("query", None, "What does the index know about...", required=True) }}{% endcall %}
{% call field("Results") %}{{ select("top_k", top_k, "5", blank=None, block=True) }}{% endcall %}
{{ primary_button("Search", "submit") }}
{% else %}

Nothing is indexed yet, so there is nothing to search.

{% endif %} {% endcall %}